package org.light.framework.util;

import java.awt.Color;
import java.awt.Font;

public class DrawItem {

    private DrawItemTypeEnum type;

    private String content;

    private int startX;

    private int startY;

    private int height;

    private Font font;

    private Color color;

    private boolean center;

    public DrawItem() {

    }

    /**
     * 适用于图片的构造函数
     * @param type
     * @param content
     * @param startX
     * @param startY
     * @param height
     */
    public DrawItem(String content, int startX, int startY, int height) {
        this.type = DrawItemTypeEnum.IMAGE;
        this.content = content;
        this.startX = startX;
        this.startY = startY;
        this.height = height;
        this.color = new Color(22, 22, 22);
        this.font = new Font("微软雅黑", Font.PLAIN, 28);
    }

    /***
     * 适用于文本的构造函数
     * @param content
     * @param startX
     * @param startY
     * @param isCenter
     * @param font
     * @param color
     */
    public DrawItem(String content, int startX, int startY, boolean isCenter, Font font,
            Color color) {
        
        this.type = DrawItemTypeEnum.TEXT;
        this.content = content;
        this.startX = startX;
        this.startY = startY;
        this.center = isCenter;
        this.font = font;
        this.color = color;
    }

    public DrawItemTypeEnum getType() {
        return type;
    }

    public void setType(DrawItemTypeEnum type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getStartX() {
        return startX;
    }

    public void setStartX(int startX) {
        this.startX = startX;
    }

    public int getStartY() {
        return startY;
    }

    public void setStartY(int startY) {
        this.startY = startY;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public Font getFont() {
        return font;
    }

    public void setFont(Font font) {
        this.font = font;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    public boolean isCenter() {
        return center;
    }

    public void setCenter(boolean center) {
        this.center = center;
    }
}
